from django.conf.urls.defaults import *
from django.conf import settings

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    (r'^$', 'exploration.views.main'),
	(r'^newobject$', 'exploration.views.add_counterexample'),
    (r'^getpremise$', 'exploration.views.get_premise'),
    (r'^attributeimplication/accept$', 'exploration.views.accept_implication'),
    (r'^attributeimplication/unaccept$', 'exploration.views.unaccept_implication'),
    (r'^import$', 'exploration.views.import_context_view'),
    (r'^export$', 'exploration.views.export_view'),
    (r'^accounts/login/$', 'django.contrib.auth.views.login'),
    (r'^accounts/logout/$', 'exploration.views.logout_view'),
    (r'^accounts/log/$', 'exploration.views.log'),
    (r'^objects/new$', 'exploration.views.new_object'),
    (r'^attributes/new$', 'exploration.views.new_attribute'),
    (r'^objects/edit/(\d+)$', 'exploration.views.edit_object'),
    (r'^attributes/edit/(\d+)$', 'exploration.views.edit_attribute'),
    # Example:
    # (r'^exploration_website/', include('exploration_website.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    (r'^admin/', include(admin.site.urls)),
)

# We serve static files (stylesheets, images, etc.) this way only
# in development mode. 
if settings.DEBUG:
    urlpatterns += patterns('',
        (r'^static/(?P<path>.*)$',
         'django.views.static.serve', 
         {'document_root': settings.STATIC_DOC_ROOT}),
    )